import request from '@/utils/request';

/**获取配置列表
 * 
 * @param params 
 * @returns 
 */
export function getConfigListAPI(params:any) {
    return request({ 
        url: '/alarm/configuration/list', 
        method: 'get', 
        params: params 
    });
}

/**获取报警配置信息
 * 
 * @param amId 
 * @returns 
 */
export function getConfigInfoAPI(amId:string) {
    return request({ 
        url: `/alarm/configuration/${amId}`, 
        method: 'get', 
    });
}

/**新增配置信息
 * 
 * @param data 
 * @returns 
 */
export function addConfigAPI(data:any) {
    return request({ 
        url: `/alarm/configuration`, 
        method: 'post',
        data: data 
    });
}

/**修改配置信息
 * 
 * @param data 
 * @returns 
 */
export function upDataConfigAPI(data:any) {
    return request({ 
        url: `/alarm/configuration`, 
        method: 'put',
        data: data 
    });
}

/**删除配置信息
 * 
 * @param amIds 
 * @returns 
 */
export function deleteConfigAPI(amIds:string[]) {
    return request({ 
        url: `/alarm/configuration/${amIds}`, 
        method: 'delete',
    });
}

/**刷新配置文件 */
export function upDataConfigFileAPI() {
    return request({ 
        url: `/alarm/configuration/flushAlarmConfiguration`, 
        method: 'get',
    });
}



